<template>
    <div class="com-tree">
      <div class="left-tree">
        <tree-heat :onChange="onChange1"></tree-heat>
      </div>
      <div class="right-table">
        <table-induction></table-induction>
      </div>
    </div>
  </template>
  <script>
  import treeHeat from "./Base_InductionFurnaceTree.vue";
  import TableInduction from "./InductionFurnaceReplenishment.vue";
  export default {
    components: {
        treeHeat,
        TableInduction
    },
    created() {
      //初始化一个对象全局缓存起来，当点击左边树形菜单时，把点击菜单的treeId(角色id)存到treeDemo1里
      this.$store.getters.data().treeHeat = { treeId: undefined };
    },
    methods: {
      onChange1(treeId) {
        //调用table(viewGird.vue)刷新方法
        this.$store.getters.data().viewGridLocation.nodeClick(treeId); //这里可以写任意参数
      }
    }
  };
  </script>
  
  <style lang="less" scoped>
  .com-tree {
    display: flex;
    > .left-tree {
      width: 150px;
    }
    > .right-table {
      flex: 1;
    }
  }
  </style>
  